#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPainter>
#include <QMouseEvent>
#include "../../board/Board.h"
#include "../../checkers/Checkers.h"


//defines:
#define NO_GAME         -1
#define LOCAL_2PLAYER   0
#define LOCAL_AI        1
#define NETWORK_HOST    2
#define NETWORK_CLIENT  3

#define EASY            0
#define MEDIUM          1
#define HARD            2

#define NULL_MOUSE      -1


namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void setBoardState(Board board);

private slots:
    void on_actionQuit_triggered();

    void on_actionAbout_triggered();

    void on_actionNew_Local_Game_triggered();

    void on_actionHost_Network_Game_triggered();

    void on_actionConnect_to_Game_triggered();

    void on_actionHow_to_Play_triggered();

    void closeEvent();

    void mousePressEvent( QMouseEvent *e );

protected:
    void paintEvent(QPaintEvent *event);



private:
    Ui::MainWindow *ui;

    //following variables control flow of game
    Checkers game;

    int gameType;
    int aiLevel;
    int playerTurn;

    //variables relating to drawing the gui
    int sqWidth;
    int sqHeight;
    //mouse co-ords
    int x;
    int y;
    int prevx;
    int prevy;

    //clicked contains the value of which player clicked, possibly superseded/will be merged into playerTurn;
    int clicked;


};

#endif // MAINWINDOW_H
